package com.common.result;

import lombok.Getter;

@Getter
public enum ResultEnum {
    SECCESS(200,"成功"),
    USER_NOT_LOGIN(401,"用户未登录，请先登录"),
    ADD_USER_FAILE(41000,"新建用户失败，请重试"),
    USER_ACCOUNT_HAVE_EXIST(41001,"用户已经存在"),
    USER_NICKNAME_HAVE_EXIST(41002,"昵称已存在"),
    USER_FORMAT_ERROR(41003,"格式不符"),

    JWT_PARSE_ERROR(41004,"JWT解析失败"),
    JWT_RENEW_ERROR(41005,"JWT续期失败"),
    USER_ACCOUNT_OR_PASSWORD_ERROR(41105,"账号或者密码错误"),

    USER_ACCOUNT_HAS_BEEN_ABANDON(41999,"账户已经被封禁，无法登录"),


    ADD_ARTICLE_FAILED(42000,"添加文章失败"),
    GET_ARTICLE_NOT_EXIST(42001,"文章不存在"),

    //管理模块异常
    GET_USER_STATUS_FAILED(43000,"获取用户状态失败"),
//文件相关47000
    CREATE_USER_DIRECTORY_FAILED(47001,"创建用户目录失败"),
    FILE_UPLOAD_FAILED(47002,"文件上传失败"),
    FILE_FORMAT_ERROR(47003,"文件格式错误"),
    FILE_NOT_ALLOWED_EMPTY(47004,"文件不允许为空"),

    ADD_SHOPPING_CAR_FAILED(48000,"加入购物车失败"),
    DELETE_SHOPPING_CAR_FAILED(48001,"删除购物车出现问题"),
    DELETE_SHOPPING_CAR_SECCESS(48002,"删除购物车商品成功"),
    SELLER_ADD_GOODS_FAILED(48003,"商家添加商品失败"),
    CREATE_ORDER_FAILED(48004,"创建订单失败"),
    MALL_UNKNOWN_ERROR(48999,"商城发生未知的错误，请稍后重试"),

    ERROR_UNKNOWN(49998,"发生了未知的异常"),
    INTERNET_ERROR(49999,"网络异常请稍后重试"),
    REDIS_STORAGE_JWT_ERROR(51000,"redis存储jwt失败");

    private int code;
    private String message;
    private ResultEnum(int code,String message){
         this.code=code;
         this.message=message;
    }

}
